﻿/**
* 椭圆形节点。
*/
Ext.define('Happy.designer.Ellipse', {
    extend: 'Happy.designer.Node',

    /**
     * @inheritdoc
     */
    shapeType: 'ellipse',
    /**
     * @inheritdoc
     */
    defaultShapeConfig: {
        fill: '#FFC',
        stroke: '#000',
        'stroke-width': 2,
        x: 30,
        y: 30,
        radiusX: 30,
        radiusY: 30
    },

    /**
     * @inheritdoc
     */
    getShapeBox: function (shape) {
        return {
            x: shape.x - shape.radiusX,
            y: shape.y - shape.radiusY,
            width: shape.radiusX * 2,
            height: shape.radiusY * 2
        };
    }
});